/*
 * Copyright (C) 2008 Universidade Federal de Campina Grande
 *  
 * This file is part of OurGrid. 
 *
 * OurGrid is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free 
 * Software Foundation, either version 3 of the License, or (at your option) 
 * any later version. 
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details. 
 * 
 * You should have received a copy of the GNU Lesser General Public License 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package org.ourgrid.acceptance.worker;

import org.junit.Before;
import org.junit.Test;
import org.ourgrid.acceptance.util.worker.Req_004_Util;
import org.ourgrid.acceptance.util.worker.Req_093_Util;
import org.ourgrid.reqtrace.ReqTest;

@ReqTest(reqs="REQ093")
public class Req_093_Test extends WorkerAcceptanceTestCase {
	
	@Before
	public void setUp() throws Exception {
		super.setUp();
		workerAcceptanceUtil.simulateAuthentication();
	}
	
	/**
	 * This test contains the following steps:
	 * 
	 *    1. Start a Worker
	 *    2. Get master peer
	 *          1. Verify if the master peer is null
	 * 
	 */
	@ReqTest(test=" AT-093.1", reqs="REQ093")
	@Test public void test_at_093_1_ConsultingUndefinedWorkerMasterPeer() throws Exception {
		// Start a worker
		new Req_004_Util(getComponentContext()).startWorker();
		
		// Get master peer
		// Verify if the master peer is null
		new Req_093_Util(getComponentContext()).getMasterPeer(null);
	}

}